#pragma once

#include <cassert>
#include <vector>

#include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Image.hpp>

class Player;

class Block : public sf::Sprite
{
public:
    static const int Height = 32;
    static const int Width = 32;
    static void LoadTextures();

    enum Type { Void, Wall, Nitro, Removable, TypeCount };

    Block(void);
    virtual ~Block(void);

    Type type() const { return m_type; }
    void setType(Type type) { assert(type < TypeCount); m_type = type; SetImage(m_images[m_type]); }

    void action(Player &player);

protected:
    Type m_type;
    static std::vector<sf::Image> m_images;
};
